/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package validation;

import org.jdesktop.beansbinding.Validator;
import org.jdesktop.beansbinding.Validator.Result;

/**
 *
 * @author Usuario
 */
public class NumbersValidator extends Validator<String> {

    @Override
    public Result validate(String value) {
        if(!value.matches("^[0-9 ]+$"))
            return new Validator.Result(null, "El campo solo admite números");
        return null;    
    }
    
}
